home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / etc / NetworkManager / dispatcher.d / 60-iceweasel.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  2013-01-06  |  1.0 KB  |  38 lines

  1. #! /bin/sh
  2.  
  3. # Run only when the interface is not "lo":
  4. if [ $1 = "lo" ]; then
  5.    exit 0
  6. fi
  7.  
  8. # Run whenever an interface gets "up", not otherwise:
  9. if [ $2 != "up" ]; then
  10.    exit 0
  11. fi
  12.  
  13. # There's nothing to do if Iceweasel is already running
  14. if pgrep -u "${LIVE_USERNAME}" firefox-bin 1>/dev/null 2>&1; then
  15.    exit 0
  16. fi
  17.  
  18. # Get LIVE_USERNAME
  19. . /etc/live/config.d/username.conf
  20. export DISPLAY=':0.0'
  21. export XAUTHORITY="`echo /var/run/gdm3/auth-for-${LIVE_USERNAME}-*/database`"
  22. export XDG_DATA_DIRS=/usr/share/gnome:/usr/share/gdm/:/usr/local/share/:/usr/share/
  23. export MONKEYSPHERE_VALIDATION_AGENT_SOCKET='http://127.0.0.1:6136'
  24. # Get GTK_IM_MODULE, QT_IM_MODULE and XMODIFIERS
  25. if [ -e "/home/${LIVE_USERNAME}/.im_environment" ] ; then
  26.    . "/home/${LIVE_USERNAME}/.im_environment"
  27.    if [ -n "${XMODIFIERS}" ] ; then
  28.       export XMODIFIERS
  29.    fi
  30.    if [ -n "${GTK_IM_MODULE}" ] ; then
  31.       export GTK_IM_MODULE
  32.    fi
  33.    if [ -n "${QT_IM_MODULE}" ] ; then
  34.       export QT_IM_MODULE
  35.    fi
  36. fi
  37. exec /bin/su -c iceweasel "${LIVE_USERNAME}" &
  38.